package com.earthea.application.task.entity;

import lombok.Getter;

@Getter
public class TaskResult {
    private final int status;

    private final String description;

    private TaskResult(int status, String description) {
        this.status = status;
        this.description = description;
    }

    public static TaskResult success() {
        return new TaskResult(TaskStatus.SUCCESS.getStatus(), "success");
    }

    public static TaskResult success(String description) {
        return new TaskResult(TaskStatus.SUCCESS.getStatus(), description);
    }

    public static TaskResult failure() {
        return new TaskResult(TaskStatus.FAIL.getStatus(), "failed");
    }

    public static TaskResult failure(String description) {
        return new TaskResult(TaskStatus.FAIL.getStatus(), description);
    }
}
